package main

import (
	"go-glue.googlecode.com/hg/rlglue"
)

type MessageEnv struct{ emptyObs rlglue.Observation }

func (re *MessageEnv) EnvInit() string {
	re.emptyObs = rlglue.NewObservation([]int32{}, []float64{}, []byte{})
	return ""
}
func (re *MessageEnv) EnvStart() rlglue.Observation {
	return re.emptyObs
}
func (re *MessageEnv) EnvStep(action rlglue.Action) (obs rlglue.Observation, r float64, t bool) {
	obs = re.emptyObs
	r = 0
	t = false
	return
}
func (re *MessageEnv) EnvCleanup() {
}
func (re *MessageEnv) EnvMessage(message string) (reply string) {
	reply = message
	if message == "" {
		reply = "empty"
	}
	if message == "empty" {
		reply = ""
	}
	if message == "null" {
		reply = ""
	}
	return
}
func main() {
	if err := rlglue.LoadEnvironment(new(MessageEnv)); err != nil {
		panic(err)
	}
}
